//
// Created by liushuai on 18-8-7.
//

#include "Brass.hpp"
#include <iostream>
Brass::Brass(const std::string &s, long an, double bal) : fullName(s),accNum(an),balance(bal){};
double Brass::Balance() const { return balance;}
void Brass::Deposit(double amt) {
    if(amt<0)
        std::cout<<"负数存款不允许，存款取消！\n";
    else
        balance += amt;
}
void Brass::Withdraw(double amt) {
    if(amt<0)
        std::cout<<"取款数必须为正数！\n";
    else if(amt <= balance)
        balance -= amt;
    else
        std::cout<<"取款超出存款数了！\n";
}
void Brass::ViewAcct() const {
    std::cout<<"Client: "<<fullName<<"\n";
    std::cout<<"Account Number: "<<accNum<<"\n";
    std::cout<<"Balance:$ "<<balance<<"\n";
}
Brass::~Brass() {
}